package com.tomato.commons.errors;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 应用程序异常
 */
@AllArgsConstructor
public enum CommonErrorType implements ErrorType {
    SUCCESS("2000000","system.process.success","Success"),
    SERVER_ERROR("5000000","system.server.error","Server Error"),
    EMAIL_ERROR("5000001","email.server.error","邮件操作失败");

    private String code;
    private String template;
    private String message;

    @Override
    public String code() {
        return this.code;
    }

    @Override
    public String message() {
        return this.message;
    }

    @Override
    public String getTemplate() {
        return this.template;
    }
}
